/*
 * > /*
>  * INSANE - Interactive Structural Analysis Environment
>  *
>  * Copyright (C) 2003-2004
>  * Universidade Federal de Minas Gerais
>  * Escola de Engenharia
>  * Departamento de Engenharia de Estruturas
>  *
>  * Author's email :     insane@dees.ufmg.br
>  * Author's Website :   http://www.dees.ufmg.br/insane
>  *
>  * This program is free software; you can redistribute it and/or
>  * modify it under the terms of the GNU General Public License
>  * as published by the Free Software Foundation; either version 2
>  * of the License, or any later version.
>  *
>  * This program is distributed in the hope that it will be useful,
>  * but WITHOUT ANY WARRANTY; without even the implied warranty of
>  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>  * GNU General Public License for more details.
>  *
>  * You should have received a copy of the GNU General Public License
>  * along with this program; if not, write to the Free Software
>  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-
> 1307, USA.
 *
 */

package br.ufmg.dees.insane.model.prep;

import java.io.Serializable;
import java.util.Observable;
import java.util.Observer;

/**
 * The geometric model for the pre-processor.
 * @author Ferreira, Reginaldo & Pitangueira, Roque
 * @since february 2007
 */

public class GeoPrepModel extends Observable implements Serializable{

	private static final long serialVersionUID = 1L;
	private String name;
    private String path;
    private HalfEdgePrepModel dataStructure;
    private Boolean hasFile, isModified;

//  ****************************************************************************
	
	public GeoPrepModel()
	{
		this.path = new String();
		this.dataStructure = new HalfEdgePrepModel();
    	this.hasFile = false;
    	this.isModified = false;
	}
	
//  ****************************************************************************
	
    /** Sets the path where the model is saved */
    public void setPath(String ph)
    {
        this.path = ph;
    }
    
//  ****************************************************************************
	
    /** Gets the path where the model is saved */
    public String getPath()
    {
        return this.path;
    }	

//  ****************************************************************************
	
    /** Sets the name of the model */
    public void setName(String name)
    {
    	this.name = name;
    }
    
//  ****************************************************************************	
    
	public String getName()
	{
		return this.name;
	}

    /** Informs the model that it has a file saved on disk */
    public void setHasFile(Boolean s)
    {
    	this.hasFile = s;
    }
    
//  ****************************************************************************
    
    /** Verify if the model has a file */
    public Boolean hasFile()
    {
    	return this.hasFile;
    } 

//  ****************************************************************************
    
    /** Informs the model that it has changes */
    public void setIsModified(Boolean m)
    {
    	this.isModified = m;
    }
    
//  ****************************************************************************
    
    /** Verify if the model has changes */
    public Boolean isModified()
    {
    	return this.isModified;
    }  
    
//  ****************************************************************************
    
    public HalfEdgePrepModel getDataStructure()
    {
    	return this.dataStructure;
    }
    
    
//  ****************************************************************************    
    
    /** Updates the model */
    public void update(){
        this.setChanged();
        this.hasChanged();
        this.notifyObservers();
    }
    
//  ****************************************************************************     
    public synchronized void addObserver(Observer arg0) {
        super.addObserver(arg0);
    }
  
//  **************************************************************************** 
    
    public synchronized void deleteObserver(Observer arg0) {
        super.deleteObserver(arg0);
    }
  
//  **************************************************************************** 
    
    public synchronized void deleteObservers() {
        super.deleteObservers();
    }
    
//  ****************************************************************************	
}//end of this class
